{% extends "learning_logs/base.html" %}

{% block header %}
    <h1>主题</h1>
{% endblock header %}

{% block content %}
    <ul>
        {% for topic in topics %}
        <li>
            <a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a>
        </li>
        {% empty %}
        <li>还没有创建主题.</li>
        {% endfor %}
    </ul>
    <a href="{% url 'learning_logs:new_topic' %}">添加一个新的主题:</a>
{% endblock content %}